<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>pha-Admin 登录</title>
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/login.css" rel="stylesheet">
    <link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="container">
    <div class="row login">
        <div class="col-md-4 col-md-offset-4">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h4 class="panel-title text-center login-title"> pha-Admin 登录 </h4>
                </div>
                <div class="panel-body">
                    <form role="form" action="login" method="post">


                        <fieldset>


                            <div class="form-group">
                                <div class="input-group">
                                    <span class="input-group-addon" id="username"><i class="glyphicon glyphicon-user"></i></span>
                                    <input type="text" class="form-control" placeholder="用户名"
                                           aria-describedby="username" name="username" required>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="input-group">
                                    <span class="input-group-addon" id="password"><i class="glyphicon glyphicon-lock"></i></span>
                                    <input type="password" class="form-control" placeholder="密码"
                                           aria-describedby="password" name="password" required>
                                </div>
                            </div>
                            <div class="checkbox">
                                <label class="login-remember">
                                    <input name="remember" type="checkbox" value="Remember Me"> 记住我
                                </label>
                            </div>
                            <button type="submit" class="btn btn-success btn-block">登录</button>
                            <input  name="pwd" value="123456">
                            <input type="submit" class="btn btn-success btn-block" value="登录">
                        </fieldset>
                    </form>
                    <!-- 错误提示区域 -->
                    <div id="error-message" class="alert alert-danger hidden" role="alert">
                        <strong>错误！</strong> 用户名或密码错误。
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<script>
    // 处理登录错误提示
    function showError() {
        const urlParams = new URLSearchParams(window.location.search);
        if (urlParams.has('error')) {
            $('#error-message').removeClass('hidden');
        }
    }

    showError();
</script>
</body>
</html>